package com.novellotus.iov.carvice.maps;

import com.amap.api.maps.model.LatLng;
import com.amap.api.maps.model.Marker;
import com.novellotus.iov.carvice.bean.MapCarListBean;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by yiyi.qi on 16/10/10.
 * 聚合点
 */

public class Cluster {


    private LatLng mLatLng;//聚合点的坐标
    private List<MapCarListBean> mClusterItems;//聚合点上的元素
    private Marker mMarker;//聚合点的覆盖物


    Cluster(LatLng latLng) {

        mLatLng = latLng;
        mClusterItems = new ArrayList<>();
    }

    void addClusterItem(MapCarListBean clusterItem) {
        mClusterItems.add(clusterItem);
    }

    int getClusterCount() {
        return mClusterItems.size();
    }


    LatLng getCenterLatLng() {
        return mLatLng;
    }

    void setCenterLatLng(LatLng latLng) {
        this.mLatLng = latLng;
    }

    void setMarker(Marker marker) {
        mMarker = marker;
    }

    Marker getMarker() {
        return mMarker;
    }

    List<MapCarListBean> getClusterItems() {
        return mClusterItems;
    }
}
